﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RealEstate.Views.Account
{
    public partial class Login : System.Web.UI.Page
    {
        public List<string> Errors;
        private SqlDataSource LoginSQL;
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            // Validate the user against the Membership framework user store
            if (Membership.ValidateUser(txtUsername.Text, txtPassword.Text))
            {
                // Log the user into the site
                FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, RememberMe.Checked);
            }

            // If we reach here, the user's credentials were invalid
            InvalidCredentialsMessage.Visible = true;
        }
    }
}